require u-boot-phytium-sdk.inc

UBOOT_MAKE_TARGET ?= "DEVICE_TREE=${UBOOT_DEVICETREE}"

PROVIDES += "u-boot"

DEPENDS += "flex-native bison-native xxd-native"

PBF_NAME ?= "pbf-${MACHINE}.bin"
SRC_URI:append = " file://${PBF_NAME}"

PHYTIUM_UBOOT = "u-boot-phytium.bin"
do_deploy:append() {
    cd ${DEPLOYDIR}
    dd if=${WORKDIR}/${PBF_NAME} of=${PHYTIUM_UBOOT} bs=1K conv=notrunc
    dd if=${UBOOT_BINARY} of=${PHYTIUM_UBOOT} bs=1K seek=1536 conv=notrunc

    ln -sf ${PHYTIUM_UBOOT} ${UBOOT_BINARY}
}
